package com.singularity.common.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.singularity.common.domain.dto.permission.PermissionInfoDTO;
import com.singularity.common.domain.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 天
* @description 针对表【permission(权限表)】的数据库操作Mapper
* @createDate 2023-08-26 14:16:55
* @Entity com.singularity.common.dao.mapper.Permission
*/
@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {

    /**
     * 根据角色id批量获取权限信息
     * @param roleIds
     * @return
     */
    List<PermissionInfoDTO> selectByRoleIds(@Param("list") List<Long> roleIds);

    /**
     * 根据角色id获取权限信息
     * @param roleId
     * @return
     */
    List<PermissionInfoDTO> selectByRoleId(Long roleId);

    /**
     * 查询所有权限
     * @return
     */
    List<PermissionInfoDTO> selectAll(Integer status);
}




